package co.ntt.spms.conf;

import javax.sql.DataSource;

import org.apache.commons.dbcp.BasicDataSource;
import org.springframework.orm.ibatis.SqlMapClientFactoryBean;

public class DaoSqlMapClientFactoryBean extends SqlMapClientFactoryBean {

	@Override
	public void setDataSource(DataSource dataSource) {
		BasicDataSource basicDataSource = (BasicDataSource) dataSource;
		basicDataSource.setUrl("jdbc:sqlite:" + ClientConfig.getHomeDirectoryPath() + "/localmail.db");
		super.setDataSource(dataSource);
	}
	

}
